package com.midou.administration.controller;


import com.midou.administration.entity.UserCoupon;
import com.midou.administration.mapper.UserCouponMapper;
import com.midou.administration.service.UserCouponService;
import com.midou.administration.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author MrChen
 * @since 2021-03-24
 */
@RestController
@RequestMapping("/administration/user-coupon")
public class UserCouponController {

    @Autowired
    private UserCouponMapper mapper;
    @Autowired
    private UserCouponService userCouponService;


    @RequestMapping("/selectByid")
    public UserCoupon sele(int id){
        return this.mapper.sele(id);
    }

    @RequestMapping("/quseybyUserId")
    public List<UserCoupon> quseybyUserId(int userId){
        return this.userCouponService.queryByyserId(userId);
    }
}
